//
//  UIViewController+ViewControllerLifeCycle.m
//  RSW.IOS
//
//  Created by zhaiqiuqiu on 16/12/14.
//  Copyright © 2016年 com.xtion.crm. All rights reserved.
//

#import "UIViewController+ViewControllerLifeCycle.h"
#import "AppDelegate+ObserverNetWorkChange.h"

@implementation UIViewController (ViewControllerLifeCycle)

- (void)checkSession
{
    if([XLGContext context].m_bIsofflinelogin == NO)
    {
        [XLGUpdateSession foregroundCheckSessionIsTimeoutAsyncCompletion:^(NSInteger nResult, BOOL bIstimeout)
         {
             switch (nResult)
             {
                 case YES:
                 {
                     NSLog(@"check session success");
                     break;
                 }
                 default:
                 {
                     [NSNotificationCenter postNotification:MainViewControllerExitNotification];
                     
                     break;
                 }
             }
         }];
    }
}
@end
